package favorite.service;

import favorite.service.impl.GoodsServiceFeignClientFallback;
import favorite.config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import common.model.result.Result;

@Service
@FeignClient(name = "goods-server", fallback = GoodsServiceFeignClientFallback.class, configuration = FeignConfig.class)
public interface GoodsServiceFeignClient {
    //根据spuId查询spu
    @GetMapping("/goods/spu/{id}")
    Result getSpuById(@PathVariable("id") Long id);
}
